<fui-doc-viewer
  documentUrl="/assets/markdown/{{ example }}/fui-{{ example }}.html"
  [example]="example"
  (contentLoaded)="onContentLoaded()"
></fui-doc-viewer>

<fui-anchor [container]="elem.nativeElement">
  <fui-anchor-link *ngFor="let toc of tocs" [href]="'#' + toc.id" [title]="toc.name">
    <ng-container *ngIf="toc.children && toc.children.length > 0">
      <fui-anchor-link
        *ngFor="let secondToc of toc.children"
        [href]="'#' + secondToc.id"
        [title]="subLabel"
      >
        <ng-template #subLabel>
          <span class="link-title" [title]="secondToc.name">
            <span class="text-ellipsis">{{ secondToc.name }}</span>
            <fui-type-label
              [type]="secondToc.type"
              [short]="true"
            ></fui-type-label>
          </span>
        </ng-template>
      </fui-anchor-link>
    </ng-container>
  </fui-anchor-link>
</fui-anchor>
